/*
Navicat SQL Server Data Transfer

Source Server         : sqlserve
Source Server Version : 100000
Source Host           : CY-NOTEBOOK:1433
Source Database       : coca
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 100000
File Encoding         : 65001

Date: 2017-09-21 09:32:45
*/


-- ----------------------------
-- Table structure for tb_admin
-- ----------------------------
DROP TABLE [dbo].[tb_admin]
GO
CREATE TABLE [dbo].[tb_admin] (
[id] int NOT NULL IDENTITY(1,1) ,
[userName] varchar(255) NOT NULL ,
[password] varchar(255) NOT NULL ,
[create_time] datetime2(7) NOT NULL ,
[realname] varchar(255) NULL ,
[status] int NOT NULL ,
[role] int NOT NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[tb_admin]', RESEED, 29)
GO

-- ----------------------------
-- Records of tb_admin
-- ----------------------------
SET IDENTITY_INSERT [dbo].[tb_admin] ON
GO
INSERT INTO [dbo].[tb_admin] ([id], [userName], [password], [create_time], [realname], [status], [role]) VALUES (N'6', N'admin', N'123', N'2017-09-20 16:35:25.4370000', N'前期', N'1', N'2')
GO
GO
SET IDENTITY_INSERT [dbo].[tb_admin] OFF
GO

-- ----------------------------
-- Table structure for tb_meassge
-- ----------------------------
DROP TABLE [dbo].[tb_meassge]
GO
CREATE TABLE [dbo].[tb_meassge] (
[id] int NOT NULL IDENTITY(1,1) ,
[meassge_classid] int NOT NULL ,
[meassge_content] varchar(255) NOT NULL ,
[create_time] datetime2(7) NOT NULL ,
[msg_url] varchar(255) NULL ,
[push_url] varchar(255) NULL ,
[update_time] datetime2(7) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[tb_meassge]', RESEED, 3)
GO

-- ----------------------------
-- Records of tb_meassge
-- ----------------------------
SET IDENTITY_INSERT [dbo].[tb_meassge] ON
GO
INSERT INTO [dbo].[tb_meassge] ([id], [meassge_classid], [meassge_content], [create_time], [msg_url], [push_url], [update_time]) VALUES (N'1', N'3', N'1212', N'2017-09-20 17:25:25.6700000', N'12', null, null)
GO
GO
INSERT INTO [dbo].[tb_meassge] ([id], [meassge_classid], [meassge_content], [create_time], [msg_url], [push_url], [update_time]) VALUES (N'2', N'3', N'切切切', N'2017-09-20 17:28:59.2170000', N'111', null, null)
GO
GO
INSERT INTO [dbo].[tb_meassge] ([id], [meassge_classid], [meassge_content], [create_time], [msg_url], [push_url], [update_time]) VALUES (N'3', N'4', N'测试', N'2017-09-20 17:35:12.9900000', N'http://git.oschina.net/hywlkj/dashboard', null, null)
GO
GO
SET IDENTITY_INSERT [dbo].[tb_meassge] OFF
GO

-- ----------------------------
-- Table structure for tb_meassge_class
-- ----------------------------
DROP TABLE [dbo].[tb_meassge_class]
GO
CREATE TABLE [dbo].[tb_meassge_class] (
[id] int NOT NULL IDENTITY(1,1) ,
[meassge_classname] varchar(255) NOT NULL ,
[create_time] datetime2(7) NOT NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[tb_meassge_class]', RESEED, 7)
GO

-- ----------------------------
-- Records of tb_meassge_class
-- ----------------------------
SET IDENTITY_INSERT [dbo].[tb_meassge_class] ON
GO
INSERT INTO [dbo].[tb_meassge_class] ([id], [meassge_classname], [create_time]) VALUES (N'3', N'APP首页', N'2017-09-20 16:03:51.0000000')
GO
GO
INSERT INTO [dbo].[tb_meassge_class] ([id], [meassge_classname], [create_time]) VALUES (N'4', N'离线电子券', N'2017-09-20 16:04:15.0000000')
GO
GO
INSERT INTO [dbo].[tb_meassge_class] ([id], [meassge_classname], [create_time]) VALUES (N'5', N'html跳转', N'2017-09-20 16:04:27.0000000')
GO
GO
INSERT INTO [dbo].[tb_meassge_class] ([id], [meassge_classname], [create_time]) VALUES (N'6', N'消息中心', N'2017-09-20 16:04:40.0000000')
GO
GO
INSERT INTO [dbo].[tb_meassge_class] ([id], [meassge_classname], [create_time]) VALUES (N'7', N'个人中心', N'2017-09-20 16:04:52.0000000')
GO
GO
SET IDENTITY_INSERT [dbo].[tb_meassge_class] OFF
GO

-- ----------------------------
-- Table structure for tb_meassge_user
-- ----------------------------
DROP TABLE [dbo].[tb_meassge_user]
GO
CREATE TABLE [dbo].[tb_meassge_user] (
[id] int NOT NULL IDENTITY(1,1) ,
[meassge_id] int NOT NULL ,
[user_id] int NOT NULL ,
[is_read] int NOT NULL ,
[create_time] datetime2(7) NOT NULL ,
[update_time] datetime2(7) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[tb_meassge_user]', RESEED, 4)
GO

-- ----------------------------
-- Records of tb_meassge_user
-- ----------------------------
SET IDENTITY_INSERT [dbo].[tb_meassge_user] ON
GO
INSERT INTO [dbo].[tb_meassge_user] ([id], [meassge_id], [user_id], [is_read], [create_time], [update_time]) VALUES (N'1', N'1', N'1', N'0', N'2017-09-20 17:25:25.7000000', null)
GO
GO
INSERT INTO [dbo].[tb_meassge_user] ([id], [meassge_id], [user_id], [is_read], [create_time], [update_time]) VALUES (N'2', N'2', N'6', N'0', N'2017-09-20 17:28:59.2330000', null)
GO
GO
INSERT INTO [dbo].[tb_meassge_user] ([id], [meassge_id], [user_id], [is_read], [create_time], [update_time]) VALUES (N'3', N'2', N'1', N'0', N'2017-09-20 17:28:59.6870000', null)
GO
GO
INSERT INTO [dbo].[tb_meassge_user] ([id], [meassge_id], [user_id], [is_read], [create_time], [update_time]) VALUES (N'4', N'3', N'7', N'1', N'2017-09-20 17:35:13.0030000', N'2017-09-21 09:21:46.8400000')
GO
GO
SET IDENTITY_INSERT [dbo].[tb_meassge_user] OFF
GO

-- ----------------------------
-- Table structure for tb_order_record
-- ----------------------------
DROP TABLE [dbo].[tb_order_record]
GO
CREATE TABLE [dbo].[tb_order_record] (
[id] int NOT NULL IDENTITY(1,1) ,
[order_id] int NOT NULL ,
[user_phone] varchar(255) NOT NULL ,
[create_time] datetime2(7) NOT NULL ,
[money] decimal(12,2) NOT NULL ,
[transaction_number] varchar(255) NULL ,
[status] int NOT NULL 
)


GO

-- ----------------------------
-- Records of tb_order_record
-- ----------------------------
SET IDENTITY_INSERT [dbo].[tb_order_record] ON
GO
SET IDENTITY_INSERT [dbo].[tb_order_record] OFF
GO

-- ----------------------------
-- Table structure for tb_user
-- ----------------------------
DROP TABLE [dbo].[tb_user]
GO
CREATE TABLE [dbo].[tb_user] (
[id] int NOT NULL IDENTITY(1,1) ,
[phone] varchar(255) NOT NULL ,
[password] varchar(255) NOT NULL ,
[create_time] datetime2(7) NOT NULL ,
[wx_open_id] varchar(1) NULL ,
[status] int NOT NULL ,
[token] varchar(255) NULL ,
[update_time] datetime2(7) NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[tb_user]', RESEED, 8)
GO

-- ----------------------------
-- Records of tb_user
-- ----------------------------
SET IDENTITY_INSERT [dbo].[tb_user] ON
GO
INSERT INTO [dbo].[tb_user] ([id], [phone], [password], [create_time], [wx_open_id], [status], [token], [update_time]) VALUES (N'7', N'zhujj11', N'123456', N'2017-09-20 17:34:32.0000000', null, N'1', N'86daac2ae5d24a3da3486fe5bbedf7f9', N'2017-09-21 09:04:56.2330000')
GO
GO
SET IDENTITY_INSERT [dbo].[tb_user] OFF
GO

-- ----------------------------
-- Indexes structure for table tb_admin
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table tb_admin
-- ----------------------------
ALTER TABLE [dbo].[tb_admin] ADD PRIMARY KEY ([id])
GO

-- ----------------------------
-- Indexes structure for table tb_meassge
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table tb_meassge
-- ----------------------------
ALTER TABLE [dbo].[tb_meassge] ADD PRIMARY KEY ([id])
GO

-- ----------------------------
-- Indexes structure for table tb_meassge_class
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table tb_meassge_class
-- ----------------------------
ALTER TABLE [dbo].[tb_meassge_class] ADD PRIMARY KEY ([id])
GO

-- ----------------------------
-- Indexes structure for table tb_meassge_user
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table tb_meassge_user
-- ----------------------------
ALTER TABLE [dbo].[tb_meassge_user] ADD PRIMARY KEY ([id])
GO

-- ----------------------------
-- Indexes structure for table tb_order_record
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table tb_order_record
-- ----------------------------
ALTER TABLE [dbo].[tb_order_record] ADD PRIMARY KEY ([id])
GO

-- ----------------------------
-- Indexes structure for table tb_user
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table tb_user
-- ----------------------------
ALTER TABLE [dbo].[tb_user] ADD PRIMARY KEY ([id])
GO
